<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改字典数据')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-data-edit" th:object="${dictData}">
        <input name="dictCode" th:field="*{dictCode}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">字典排序：</label>
            <div class="col-sm-8">
                <input name="dictSort" th:field="*{dictSort}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">字典标签：</label>
            <div class="col-sm-8">
                <input name="dictLabel" th:field="*{dictLabel}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">字典键值：</label>
            <div class="col-sm-8">
                <input name="dictValue" th:field="*{dictValue}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">字典类型：</label>
            <div class="col-sm-8">
                <input name="dictType"  th:field="*{dictType}"  class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">样式属性：</label>
            <div class="col-sm-8">
                <input name="cssClass" th:field="*{cssClass}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">表格回显样式：</label>
            <div class="col-sm-8">
                <input name="listClass" th:field="*{listClass}" class="form-control" type="text">
            </div>
        </div>
<!--        <div class="form-group">-->
<!--            <label class="col-sm-3 control-label is-required">唯一key：</label>-->
<!--            <div class="col-sm-8">-->
<!--                <input name="key" th:field="*{key}" class="form-control" type="text" required>-->
<!--            </div>-->
<!--        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">扩展字段：</label>
            <div class="col-sm-8">
                <input name="extension" th:field="*{extension}"  class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "sso/data";
    $("#form-data-edit").validate({
        focusCleanup: true
    });

    var isClick = true;
    function submitHandler() {
        if ($.validate.form() && isClick) {
            isClick = false;
            $.operate.save(prefix + "/edit", $('#form-data-edit').serialize());
        }
    }
</script>
</body>
</html>